package utils;

import entity.Order;

import java.util.HashMap;

public class Outs {

    public static void out(){
        System.out.println("欢迎使用“网上订餐系统”");
        System.out.println("******************");
        System.out.println("1.我要订餐");
        System.out.println("2.查看餐袋");
        System.out.println("3.签收订单");
        System.out.println("4.删除订单");
        System.out.println("5.我要点赞");
        System.out.println("6.退出系统");
        System.out.println("******************");
    }

    public static void hashMapOut(HashMap hashMap){
        System.out.println("序号\t\t订餐人\t\t餐品信息\t\t送餐日期\t\t送餐地址\t\t总金额\t\t订单状态");
        for (int ii = 0; ii < hashMap.size(); ii++) {
            Order o = (Order) hashMap.get(ii + 1);
            System.out.println(o.getId() + "\t\t" + o.getName() + "\t\t\t" + o.getDisMegs() + "\t\t" + o.getTime() + "\t\t" + o.getAddress() + "\t" + o.getSumPrices() + "\t\t" + (o.getStates() == 0 ? "已完成" : "已预定"));
        }
    }
}
